package com.example.inflatetest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

public class MainActivity extends AppCompatActivity {

    private static final String TAG = "MainActivity";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        FrameLayout rootView = findViewById(R.id.fl_root);

        View inflateView = LayoutInflater.from(this).inflate(R.layout.inflate_layout, rootView, false);
        ViewGroup.LayoutParams rootLayoutParams = rootView.getLayoutParams();
        ViewGroup.LayoutParams inflateLayoutParams = inflateView.getLayoutParams();

        Log.d(TAG, "rootView=" + rootView + " rootView LayoutParams - " + rootLayoutParams);
        Log.d(TAG, "inflateView=" + inflateView + "inflateView LayoutParams -" + inflateLayoutParams);
    }
}